﻿using System.Data;
using System.Data.Common;

namespace DataService.Dataset
{
    public interface IDataObject
    {
        bool IsDataObjectTransactional { get; }

        void CommitTransaction();
        void RollbackTransaction();

        int ExecuteNonQueryStatement(DbCommand pCommand);
        int ExecuteNonQueryStatement(DbCommand pCommand, bool pIslemiLogla);
        object ExecuteScalar(DbCommand pCommand);
        object ExecuteScalar(DbCommand pCommand, bool pIslemiLogla);

        void GetRecords(DataTable pDataTable, DbCommand pCommand);
        void GetRecords(DataTable pDataTable, DbCommand pCommand, bool ignoreSchema);
        void GetRecords(DataTable pDataTable, DbCommand pCommand, bool ignoreSchema, LoadOption? pLoadOption);

        void GetRecords(DataSet pDataSet, DbCommand pCommand);
        void GetRecords(DataSet pDataSet, DbCommand pCommand, bool ignoreSchema);
        void GetRecords(DataSet pDataSet, DbCommand pCommand, bool ignoreSchema, LoadOption? pLoadOption);

        void Update(DataTable pDataTable, DbCommand pCommand);
        void Update(DataTable pDataTable, DbCommand pCommand, bool pIslemiLogla);
        void Update(DataTable pDataTable, DbCommand pCommand, ConflictOption pConflictOption);
        void Update(DataTable pDataTable, DbCommand pCommand, ConflictOption pConflictOption, bool pIslemiLogla);

        void Update(DataTable pDataTable);
        void Update(DataTable pDataTable, bool pIslemiLogla);
        void Update(DataTable pDataTable, bool pAcceptChangesDuringUpdate, bool pContinueUpdateonError);
        void Update(DataTable pDataTable, bool pAcceptChangesDuringUpdate, bool pContinueUpdateonError, bool pIslemiLogla);
    }
}
